﻿#region [IAccelerometerServer Using Statements]
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using AccelerometerServer.Services;
#endregion

namespace AccelerometerServer.Interfaces
{
    /// <summary>
    /// This interface specifies the necessary methods for uploading and downloading information 
    /// to the server. The server stores information about the Windows Phone 7 XNA Accelerometer
    /// Simulator such as the phone's rotation and acceleration.
    /// </summary>
    [ServiceContract]
    public interface IAccelerometerService
    {
        /// <summary>
        /// Uploads the Windows Phone 7 rotation data to the server
        /// </summary>
        /// <param name="x">Rotation on the X axis</param>
        /// <param name="y">Rotation on the Y axis</param>
        /// <param name="z">Rotation on the Z axis</param>
        [OperationContract]
        void UploadRotationData(float x, float y, float z);

        /// <summary>
        /// Uploads the Windows Phone 7 acceleration data to the server
        /// </summary>
        /// <param name="x">Acceleration on the X axis</param>
        /// <param name="y">Acceleration on the Y axis</param>
        /// <param name="z">Acceleration on the Z axis</param>
        [OperationContract]
        void UploadAccelData(float x, float y, float z);

        /// <summary>
        /// Retrieves the Windows Phone 7 rotation data from the server 
        /// </summary>
        /// <returns>Rotation on the X, Y and Z axis</returns>
        [OperationContract]
        XYZData DownloadRotationData();

        /// <summary>
        /// Retrieves the Windows Phone 7 acceleration data from the server 
        /// </summary>
        /// <returns>Acceleration on the X, Y and Z axis</returns>
        [OperationContract]
        XYZData DownloadAccelData();

        /// <summary>
        /// Notifies the server that the Windows Phone 7 XNA Accelerometer Simulator
        /// is running
        /// </summary>
        [OperationContract]
        void NotifyXNAStarted();

        /// <summary>
        /// Gets the status of the Windows Phone 7 XNA Accelerometer Simulator
        /// </summary>
        /// <returns>True if the simulator is running, false otherwise</returns>
        [OperationContract]
        bool GetXNAStatus();
    }
}
